package com.cloud.logger.zchain.zchainserver.util;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 浙江卓锐科技股份有限公司
 *
 * @author zhengyt
 * @create 2017/12/6
 * @description
 */
public class GlobalMap {

    private static Map<String,Date> nodeMap = new HashMap<>();

    public static void putMap(String key,Date val){
        nodeMap.put(key,val);
    }

    public static ConcurrentHashMap<String,Map> userMap = new ConcurrentHashMap<String,Map>();

    public static Boolean getMap(String key){
        if(nodeMap.get(key) != null){
            return true;
        }
        return false;
    }

    public static Map getUserMap(String key) {
        return userMap.get(key);
    }

    public static void putUserMap(String key,Map map) {
         userMap.put(key, map);
    }
}